const ShowDialog = (dialog_name) => {
  const modal_dialog = document.getElementById(dialog_name);
  if (!modal_dialog) {
    console.log("dialog not found", dialog_name);
    return;
  }

  if (!modal_dialog.open) {
    modal_dialog && modal_dialog.showModal();
  } else {
    modal_dialog.removeAttribute("open");
    modal_dialog.show();
  }
};

export default ShowDialog;
